<?php

//20090211 FormatElement, GetLangString updated


/*
if (isset($_COOKIE['sig'])) {
	$sig = $_COOKIE['sig'];
	$query  = "DELETE from login where sig='" . $sig ."'";
	$result = mysql_query($query);
	setcookie('sig', '', time()-3600);
	$SITE_MIDDLE .=  FormatElement(GetLangString($lang,"txt_logout"),GetLangString($lang,"msg_logout"));
} else $SITE_MIDDLE .=  FormatElement(GetLangString($lang,"txt_logout"),GetLangString($lang,"msg_logouterr"));
*/

if ($sig) {
	$sig = $_COOKIE['sig'];
	$query  = "DELETE from login where sig='" . $sig ."'";
	$result = mysql_query($query);
	if (isset($_COOKIE['sig'])) setcookie('sig', '', time()-3600);
	$SITE_MIDDLE .=  FormatElement(GetLangString($lang,"txt_logout"),GetLangString($lang,"msg_logout"));
} else $SITE_MIDDLE .=  FormatElement(GetLangString($lang,"txt_logout"),GetLangString($lang,"msg_logouterr"));


unset($id);
unset($user);
unset($sig);
include("login.php");
// insert 'welcome' page for logged out users // 
?>
